﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Finance/NestedMaster.master" AutoEventWireup="true"
	CodeBehind="CommissionChart.aspx.cs" Inherits="WebApplication.Finance.CommissionChart"
	Theme="BaselineTheme" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NestedTopRowContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="NestedMasterContent" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager>
<br />
	<!-- Columns -->
	<table border="0" cellpadding="0" cellspacing="0" style="font-family: Arial; font-size: 10pt;">
		<tr style="font-weight: bold">
			<td style="width: 20px"></td>
			<td style="width: 152px; text-align: left; vertical-align: bottom;">Staff</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Target</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Invoiced</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">To Be<br />Invoiced</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Client<br />Funds</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Agent</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Solicitor</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Sub Total</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">To Go</td>
			<td style="width: 73px; text-align: right; vertical-align: bottom;">Confirmed<br />Today</td>
		</tr>
	</table>
	<!-- Grids -->
	<table border="0" cellpadding="0" cellspacing="0" style="font-family: Arial; font-size: 10pt;">
		<tr>
			<td>
				<asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" ShowFooter="true" ShowHeader="false" GridLines="None">
					<Columns>
						<asp:TemplateField>
							<HeaderStyle HorizontalAlign="Left" />
							<ItemStyle HorizontalAlign="Left" />
							<FooterStyle HorizontalAlign="Left" />
							<ItemTemplate>
								<asp:Panel ID="pnlManager" runat="server" Style="cursor: pointer">
									<table border="0" cellpadding="0" cellspacing="0"
										style="font-family: Arial; font-weight:bold; font-size: 8pt; height:32px; background-color:#818fb4; color:White;">
										<tr>
											<td style="width: 20px; background-color:White;" valign="middle">
												<asp:ImageButton ID="imgShowHide" runat="server" ImageUrl="~/Images/GridPlus.jpg"
													AlternateText="(Show Details...)" />
											</td>
											<td style="width: 150px; text-align: left;">
												<asp:Label ID="lbManagerName" Text='<%# Eval("UserDescription") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right; background-color:#304884;">
												<asp:Label ID="Label1" Text='<%# Eval("Target","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label2" Text='<%# Eval("Invoiced","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label3" Text='<%# Eval("ToBeInvoiced","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label4" Text='<%# Eval("ClientFunds","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label5" Text='<%# Eval("AgentFees","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label6" Text='<%# Eval("SolicitorFees","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right; background-color:#304884;">
												<asp:Label ID="Label7" Text='<%# Eval("SubTotal","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right;">
												<asp:Label ID="Label8" Text='<%# Eval("ToGo","{0:B}") %>' runat="server"></asp:Label>
											</td>
											<td style="width: 74px; text-align: right; background-color:#304884;">
												<asp:Label ID="Label9" Text='<%# Eval("ConfirmedToday","{0:B}") %>' runat="server"></asp:Label>
											</td>
										</tr>
									</table>
								</asp:Panel>
								<asp:Panel ID="pnlUsers" runat="server">
									<asp:GridView ID="gridUsers" runat="server" AutoGenerateColumns="False" Width="100%" ShowHeader="false" ShowFooter="true">
										<Columns>
											<asp:BoundField DataField="UserId" DataFormatString="{0}" Visible="false"></asp:BoundField>
											<asp:BoundField>
												<ItemStyle Width="20px" HorizontalAlign="Left" />
											</asp:BoundField>
											<asp:BoundField DataField="UserDescription" DataFormatString="{0}" HeaderText="Collector">
												<ItemStyle Width="152px" HorizontalAlign="Left" />
											</asp:BoundField>
											<asp:BoundField DataField="Target" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="Target">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="Invoiced" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="Invoiced">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="ToBeInvoiced" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="ToBeInvoiced">
												<HeaderStyle Width="72px" HorizontalAlign="Right" />
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="ClientFunds" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="ClientFunds">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="AgentFees" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="AgentFees">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="SolicitorFees" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="SolicitorFees">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="ConfirmedToday" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="ConfirmedToday">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="ToGo" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="ToGo">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
											<asp:BoundField DataField="SubTotal" HtmlEncode="false" DataFormatString="{0:BC}" HeaderText="SubTotal">
												<ItemStyle Width="72px" HorizontalAlign="Right" />
											</asp:BoundField>
										</Columns>
										<HeaderStyle Font-Names="Arial" Font-Size="8pt" Font-Bold="True" CssClass="WebPartGridHeader" />
										<RowStyle Font-Names="Arial" Font-Size="8pt" Font-Bold="False" />
									</asp:GridView>
								</asp:Panel>
                                <cc1:CollapsiblePanelExtender ID="cpeDetail" runat="Server" TargetControlID="pnlUsers"
                                    ExpandControlID="pnlManager" CollapseControlID="pnlManager" Collapsed="True"
                                    TextLabelID="lbManagerName" ImageControlID="imgShowHide" ExpandedImage="~/images/GridMinus.jpg"
                                    CollapsedImage="~/images/GridPlus.jpg" SuppressPostBack="true">
								</cc1:CollapsiblePanelExtender>
							</ItemTemplate>
							<FooterTemplate>
									<table border="0" cellpadding="0" cellspacing="0" style="font-family: Arial; font-weight:bold; font-size: 8pt;">
										<tr>
											<td style="width: 22px"></td>
											<td style="width: 148px; text-align: left;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"></td>
											<td style="width: 74px; text-align: right;"><asp:Label ID="Label10" Text='<%# Model.SubTotal.ToString("BC",null) %>' runat="server"></asp:Label></td>
											<td style="width: 74px; text-align: right;"><asp:Label ID="Label11" Text='<%# Model.ToGo.ToString("BC",null) %>' runat="server"></asp:Label></td>
											<td style="width: 74px; text-align: right;"><asp:Label ID="Label12" Text='<%# Model.ConfirmedToday.ToString("BC",null) %>' runat="server"></asp:Label></td>
										</tr>
									</table>
							</FooterTemplate>
						</asp:TemplateField>
					</Columns>
				</asp:GridView>
			</td>
		</tr>
	</table>
	<p>todo</p>
	Where to put the chart?
</asp:Content>
